import { getToken } from '@/utils/auth'

export default (_self) => {

    return {
        labelWidth: "100",
        // editBtn:false,
        // delBtn:false,
        index: true,
        indexLabel: '序号',
        align: 'center',
        headerAlign: 'center',
        border: true,
        dialogWidth: '40%',
        stripe: false,
        props: {
            label: 'label',
            value: 'value'
        },
        column: [{
                label: "页面名称",
                prop: "name",
                row: true,
                span: 12,
                // search: true,
                rules: [{
                    required: true,
                    message: "请输入页面名称",
                    trigger: "blur"
                }]
            },
            {
                label: "路径",
                prop: "path",
                row: true,
                span: 12,
                // search: true,
                rules: [{
                    required: true,
                    message: "请输入小程序页面路径",
                    trigger: "blur"
                }]
            },
            {
                label: "默认参数",
                prop: "parameter",
                row: true,
                span: 12,

            },
            {
                label: "参数规则",
                prop: "intro",
                row: true,
                span: 12,

            },

            {
                width: "80",
                span: 12,
                row: true,
                label: "排序",
                prop: "sort",
                type: 'number',
                minRows: 0,
                maxRows: 99,
                value: 99,
                rules: [{
                    required: true,
                    message: '请选择排序',
                    trigger: 'blur'
                }],

            },
            {
                width: "100",
                row: true,
                span: 12,
                label: "是否tabbar",
                prop: "is_tabbar",
                // search: true,
                type: 'select',
                slot: true,
                dicData: [{
                        label: '是',
                        value: 1
                    }, {
                        label: '否',
                        value: 2
                    },

                ],
                rules: [{
                    required: true,
                    message: '请选择状态',
                    trigger: 'change'
                }],
            },

            {
                width: "80",
                row: true,
                span: 12,
                label: "状态",
                prop: "state",
                // search: true,
                type: 'select',
                slot: true,
                dicData: [{
                        label: '启用',
                        value: 1
                    },
                    {
                        label: '禁用',
                        value: 2
                    }
                ],
                rules: [{
                    required: true,
                    message: '请选择状态',
                    trigger: 'change'
                }],
            },
        ],
    }
}